﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using NHibernate.Expression;
using Castle.ActiveRecord.Framework.Config;

namespace RmitTimeSheet.Domain
{
    [ActiveRecord]
    public class TimeSheet:ActiveRecordBase<TimeSheet>
    {
        private int _timeId;
        private int _timeBegin;
        private int _timeEnd;
        private int _days;
        private int _room;
        private int _status;

        [PrimaryKey(Column = "TimeId")]
        public int TimeId
        {
            get
            {
                return _timeId;
            }
            set
            {
                _timeId = value;
            }

        }
        [Property(Column = "TimesBegin")]
        public int TimeBegin
        {
            get
            {
                return _timeBegin;
            }
            set
            {
                _timeEnd = value;
            }
        }
        [Property(Column = "TimesEnd")]
        public int TimeEnd
        {
            get
            {
                return _timeEnd;
            }
            set
            {
                _timeEnd = value;
            }
        }
        [Property(Column = "Days")]
        public int Days
        {
            get
            {
                return _days;
            }
            set
            {
                _days = value;
            }
        }
        [Property(Column = "Room")]
        public int Room
        {
            get
            {
                return _room;
            }
            set
            {
                _room = value;
            }
        }

        public static TimeSheet[] ShowAll()
        {
            return (TimeSheet[])ActiveRecordBase.FindAll(typeof(TimeSheet));
        }

    }
}
